//
//  YKHadoopConfig.m
//  YKHadoopSDK
//
//  Created by edward on 2023/3/14.
//  Copyright © 2023 Edward（本内容遵循MIT协议）. All rights reserved.
//

#import "YKHadoopConfig.h"
#import "YKHadoopProtocol.h"

@interface YKHadoopConfig ()<YKHadoopConfigDelegate> {
    NSString *_host;
    NSString *_path;
    NSString *_user;
    NSString *_pwd;
}

@end

@implementation YKHadoopConfig

static YKHadoopConfig *_instance;

+ (id)allocWithZone:(struct _NSZone *)zone
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instance = [super allocWithZone:zone];
    });

    return _instance;
}

+ (instancetype)share
{
    if (_instance == nil) {
        _instance = [[YKHadoopConfig alloc] init];
    }
    return _instance;
}

+ (NSString *)host
{
    return [YKHadoopConfig share]->_host;
}

+ (void)setHost:(NSString *)host
{
    [YKHadoopConfig share] -> _host = host;
}

+ (NSString *)path
{
    return [YKHadoopConfig share]->_path;
}

+ (void)setPath:(NSString *)path
{
    [YKHadoopConfig share] -> _path = path;
}

+ (NSString *)user
{
    return [YKHadoopConfig share]->_user;
}

+ (void)setUser:(NSString *)user
{
    [YKHadoopConfig share] -> _user = user;
}

+ (NSString *)pwd
{
    return [YKHadoopConfig share]->_pwd;
}

+ (void)setPwd:(NSString *)pwd
{
    [YKHadoopConfig share] -> _pwd = pwd;
}


@end
